/*
 * @FileName: boot_comm.h
 * @Author: GreyQiu qiushaogui@aikosolar.com
 * @Date: 2023-08-24 13:59:24
 * @LastEditors: GreyQiu qiushaogui@aikosolar.com
 * @LastEditTime: 2023-09-18 11:58:34
 * @Description: 
 * 
 * Copyright (c) 2023, All Rights Reserved. 
 */
#ifndef __BOOT_COMM_H__
#define __BOOT_COMM_H__

#include <stdint.h>
#include <stdbool.h>

// 命令定义
typedef enum {
    CMD_BOOT_UNLOCK = 0x41,
    CMD_BOOT_JUMP_BOOT =  0x42,
    CMD_BOOT_ERASE =  0x43,
    CMD_BOOT_PROG = 0x44,
    CMD_BOOT_CHECK =  0x45,
    CMD_BOOT_JUMP_APP =  0x46,
    CMD_RUN_MODE = 0x47,
    CMD_NUM = 6
} cmd_id_t;

void boot_comm_handle(uint8_t * buf, uint32_t len);
void boot_comm_init(void);

#endif // __BOOT_COMM_H__
